#!/sbin/openrc-run

name=gonic
command="/usr/bin/gonic"
command_args="$GONIC_OPTS"
command_background=true
pidfile="/var/run/${RC_SVCNAME}.pid"
error_log="/var/log/gonic.log"
command_user="gonic:gonic"

start_pre() {
	checkpath -f --owner "$command_user" --mode 0644 \
		/var/log/gonic.log
	checkpath -d --owner "$command_user" --mode 0755 \
		/var/lib/gonic/
	checkpath -d --owner "$command_user" --mode 0755 \
		/var/cache/gonic/
}

depend() {
        need net
        after firewall
}